<template>
  <div class="Person">
    <h2>当前求和为：{{ sum }}</h2>
    <button @click="increment">点我+1</button>
    <hr>
    <img v-for="(u, index) in dogList" :key="index" :src="(u as string)">
    <button @click="getDog">再来一只狗</button>
  </div>
</template>

<!-- vue3写法 -->
<script lang="ts" setup name="Person">
import useDog  from "../hook/useDog";
import  useSum  from "../hook/useSum";

let { sum, increment } = useSum();
let { dogList, getDog } = useDog();
</script>

<style>
img {
  width: 100px;
  margin-left: 10px;

}
</style>